﻿using System.Collections.Generic;
using LogicAnalyzerCommon;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;

namespace UnitTests
{
    [TestFixture]
    public class TestSimpleLogicAnalyzerExtensionMethods
    {
        [Test]
        public void TestCrc8Dallas()
        {
            List<byte> array = new List<byte>();
            for (int index = 0; index < 256; index++)
            {
                array.Add((byte)index);
            }
            Assert.That(array.Count, Is.EqualTo(256));

            Assert.That(array.Crc8Dallas(), Is.EqualTo(24));
        }
    }
}
